package org.gwt.pluginframework.plugin;

import com.google.gwt.user.client.ui.Widget;

public class BaseTabbable implements Tabbable {
	private static final long serialVersionUID = 8112385047031972569L;

	protected String id;
	
	protected String label;

	protected Widget body;
	
	protected boolean closable = true;
	
	public BaseTabbable() {
		// do nothing
	}
	
	public BaseTabbable(String id) {
		this.id = id;
	}
	
	public BaseTabbable(String id, String label) {
		this.id = id;
		this.label = label;
	}
	
	public BaseTabbable(String id, String label, Widget body) {
		this.id = id;
		this.label = label;
		this.body = body;
	}
	
	public BaseTabbable(String id, String label, Widget body, boolean closable) {
		this.id = id;
		this.label = label;
		this.body = body;
		this.closable = closable;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getId() {
		return id;
	}
	
	public void setBody(Widget body) {
		this.body = body;
	}
	
	public Widget getBody() {
		return body;
	}

	public void setLabel(String label) {
		this.label = label;
	}
	
	public String getLabel() {
		return label;
	}
	
	public void setClosable(boolean closable) {
		this.closable = closable;
	}
	
	public boolean isClosable() {
		return closable;
	}

	public void onBeforeClose() {
		// do nothing
	}

	public void onClose() {
		// do nothing
	}

	public void onSelect() {
		// do nothing
	}

	public void onStart() {
		// do nothing
	}
}
